package com.wm.exam.service.impl;

import com.wm.exam.dao.UserMapper;
import com.wm.exam.pojo.User;
import com.wm.exam.service.UserService;
import com.wm.exam.utils.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    /**
     * 用户登录
     * @param user
     * @return
     */
    @Override
    public User login(User user) {
        return userMapper.login(user.getStuNum(),MD5Util.MD5EncodeUtf8(user.getPassword()));
    }
}
